package com.petshop.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.petshop.pojo.Likes;
import com.petshop.utils.Result;

/**
 * @author 20289
 * @description 针对表【likes(存储用户对帖子的点赞信息)】的数据库操作Service
 * @createDate 2025-02-27 11:17:00
 */
public interface LikesService extends IService<Likes> {

    /**
     * 点赞与取消点赞的切换
     *
     * @param postId
     * @return
     */
    Result toggleLike(Integer postId, String token);

    /**
     * 根据帖子的id获取帖子的获赞数量
     *
     * @param postId
     * @return
     */
    Result getLike(String postId);
}
